﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharedGenomics.Workbench.Core
{
    public class AssignmentMappingStrategy<TTarget> : ITypeMappingStrategy where TTarget : class
    {
        private Type assignmentType = typeof(TTarget);

        public void ExamineType(Type type, IDictionary<Type, Type> mappings)
        {
            if (assignmentType.IsAssignableFrom(type))
            {
                mappings[this.assignmentType] = type;
            }
        }
    }
}
